/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package jp.co.irep.juten.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author toan_nguyen
 */
@Embeddable
public class ItemEditStatusPK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "manage_no")
    private int manageNo;
    @Basic(optional = false)
    @NotNull
    @Column(name = "item_name")
    private short itemName;

    public ItemEditStatusPK() {
    }

    public ItemEditStatusPK(int manageNo, short itemName) {
        this.manageNo = manageNo;
        this.itemName = itemName;
    }

    public int getManageNo() {
        return manageNo;
    }

    public void setManageNo(int manageNo) {
        this.manageNo = manageNo;
    }

    public short getItemName() {
        return itemName;
    }

    public void setItemName(short itemName) {
        this.itemName = itemName;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) manageNo;
        hash += (int) itemName;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ItemEditStatusPK)) {
            return false;
        }
        ItemEditStatusPK other = (ItemEditStatusPK) object;
        if (this.manageNo != other.manageNo) {
            return false;
        }
        if (this.itemName != other.itemName) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "jp.co.irep.tech.juten.jpa.entity.ItemEditStatusPK[ manageNo=" + manageNo + ", itemName=" + itemName + " ]";
    }
    
}
